#ifndef QCPICKRESULTICONDELEGATE_H
#define QCPICKRESULTICONDELEGATE_H

#include <QStyledItemDelegate>

class QcPickResultListItemDelegate : public QStyledItemDelegate
{
    using super_ = QStyledItemDelegate;

    Q_OBJECT
public:
    using super_::super_;

    QWidget *createEditor(QWidget*, const QStyleOptionViewItem&, const QModelIndex&) const override {
        return nullptr;
    }

    void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;

    // 修正分组根节点的尺寸
    QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;

private:

    // 修正分组根节点的样式
    void initStyleOption(QStyleOptionViewItem *option, const QModelIndex &index) const override;
};

#endif // QCPICKRESULTICONDELEGATE_H
